import Vue from 'vue'

import VueRouter from 'vue-router'
Vue.use(VueRouter)

import cart from '../components/cart.vue'

import Goodlist from '../components/goodlist.vue'
import Address from '../components/Address.vue'
import vieworder from '../components/vieworder.vue'
import success from '../components/success.vue'
import register from '../components/register.vue'

 var router = new VueRouter({
  routes: [
    {path:'/',redirect:'/goodlist'},
    { path: '/cart', component: cart },
    { path: '/register', component: register },
    { path: '/goodlist', component: Goodlist },
    { path: '/Address', component: Address },
    { path: '/vieworder:addressId', component: vieworder, name:'vieworder' },
    { path: '/success:orderId', component: success, name:'success' }
  ]
})

export default router
